<% if mobile? %>
  <% content_for :mobile_menu do %>
  <a href=""></a>
  <% end %>
  <% content_for :app_back do %>
  <a href="javascript:void(0)" onclick="history.go(-1)">
    <i class="icon-arrow-left"></i>
  </a>
  <% end %>
  <% content_for :app_title do %>
    设计作品
  <% end %>
  <% content_for :app_action do %>
  <a href=""></a>
  <% end %>

  <div class="design-case-show-mobile">
  <div class="content">
    <h1><%= @design_case.title %></h1>
    <div class="infos">
      <div>
        <h2><%= @design_case.total_amount %>万元</h2>
        <span>全屋花费</span>
      </div>
      <div>
        <h2><%= @design_case.area %>㎡</h2>
        <span>全屋面积</span>
      </div>
      <div>
        <h2><%= @design_case.window_and_door_budget %>万元</h2>
        <span>门窗费用</span>
      </div>
    </div>
    <hr>
    <div class="article">
      <%= @design_case.desc %>
    </div>
    <div class="page-header">
      <h4>案例图片欣赏</h4>
    </div>
    <% if @design_case.design_case_attachments.present? %>
      <% @design_case.design_case_attachments.each do |img| %>
      <a href="<%= img.image_url %>" target="_blank">
        <img src="<%= img.image_url %>" alt="" style="width: 100%;margin-bottom: 20px;">
      </a>
      <% end %>
    <% end %>
  </div>
</div>
<% else %>
  <section class="design-cases-show">
      <div class="row margin-reset">
          <div class="col-xs-9 title">
              <h1><%= @design_case.title %></h1>
              <div class="row info">
                  <div class="col-xs-4">
                      <div class="content"><%= @design_case.total_amount %>万元</div>
                      <div class="desc">全屋花费</div>
                  </div>
                  <div class="col-xs-4 text-center">
                      <div class="content"><%= @design_case.area %>㎡</div>
                      <div class="desc">门窗面积</div>
                  </div>
                  <div class="col-xs-4 text-center">
                      <div class="content"><%= @design_case.window_and_door_budget %>万元</div>
                      <div class="desc">门窗预算</div>
                  </div>
              </div>
          </div>

          <div class="col-xs-3 designer">
              <%= get_designer_avatar(@designer) %>
              <div class="desc">
                  <h1><%= @designer.name %></h1>
                  <div class="post"><%= @designer.position %></div>
                  <a href="" class="btn btn-primary submit-btn">
                      <i class="fa fa-comments"></i>
                      马上咨询
                  </a>
              </div>
          </div>
      </div>

      <hr>
      <div class="row margin-reset">
        <div class="col-xs-7 article" style="padding: 5px 15px;">
          <%= @design_case.desc %>

          <div class="page-header">
            <h4>案例图片欣赏</h4>
          </div>
          <div class="row imgs">
            <% if @design_case.design_case_attachments.present? %>
              <% @design_case.design_case_attachments.each do |img| %>
                <div class="col-xs-4">
                  <a class="item" href="<%= img.image_url %>" target="_blank" style="background-image: url(<%= img.image_url %>);">
                    <!-- <img src="<%= img.image_url %>" alt=""> -->
                  </a>
                </div>
              <% end %>
            <% end %>
          </div>
        </div>
      </div>
  </section>
<% end %>
